<?php
require 'vendor/autoload.php';
require 'RobotServiceEx/autoload.php';
$question = "你好";
$userId = "litong";

$pf = new UserAttribute();
$pf->setName("platform");
$pf->setValue("web");
$attributes = array(
  $pf
);

$robotRequest = new RobotRequest(10);
$robotRequest->setQuestion($question);
$robotRequest->setUserId($userId);
$robotRequest->setAttributes($attributes);

var_dump($robotRequest);
echo "请求输入完毕";
$robotServiceEx = new RobotServiceEx();

$deliver = new deliver();
$deliver->setRobotRequest($robotRequest);
var_dump($deliver);

$client = new nusoap_client('http://ibotcluster.online.uairobot.com/robot/app/bjhg/ws/RobotServiceEx?wsdl', 'wsdl');
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = false;

$result = $client->call('deliver', array(
  $deliver
));
var_dump($result);






